package com.xuyuan.reflect;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.Date;

@Data
public class TestCommonClass {

    private static final String STATIC_FIELD = "static field";

    @JsonProperty(value = "myName", index = 4)
    private String name;
    @JsonProperty(value = "myAge", index = 3)
    private Integer age;

    @JsonProperty(value = "birthday", index = 2)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Date date;
    @JsonProperty(value = "myHeight", index = 1)
    private int height;

    public static String method1() {
        return "method1";
    }

    static void method5(String name) {
    }

    public static void setStaticField(String staticField) {
    }

    protected String method2() {
        return "method2";
    }

    private String method3(String name) {
        return name;
    }

    private String method3(String name, int age) {
        return name + age;
    }

    void method4() {
    }
}
